﻿@model Entity.Cart.Cart

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<fieldset>
    <legend>Cart</legend>


@if (Model == null)
{ 
    @Html.Label("Cart empry")
}
else
{
    <div class="display-label">Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>
    
    foreach (var prod in Model.Products)
    {
            @prod.Name
    }
}
</fieldset>
<p>
    @Html.ActionLink("Back to List", "Index")
</p>
